# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=bcg729
pkgver=1.1.1
pkgrel=0
pkgdesc="A C implementation of the ITU G729 Annex A/B codec"
url="https://github.com/BelledonneCommunications/bcg729"
arch="all"
license="GPL-3.0"
makedepends="cmake"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/BelledonneCommunications/bcg729/archive/$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DENABLE_STATIC=NO \
		-DCMAKE_INSTALL_LIBDIR="/usr/lib" .
	make
}

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="e8cc4b7486a9a29fb729ab9fd9e3c4a2155573f38cec16f5a53db3b416fc1119ea5f5a61243a8d37cb0b64580c5df1b632ff165dc7ff47421fa567dafffaacd8  bcg729-1.1.1.tar.gz"
